<extend name="Base/base" />
<block name='head'>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/kaoqin.css"/>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/main.css"/>
</block>
<block name="content" >
    <section class="layui-larry-box mian-page page-attendanceStatistics">
        <div class="larry-personal">
            <div class="layui-tab">
                <blockquote class="layui-elem-quote news_search">
                    <input type="hidden" id='user_id' value='{$_GET["user_id"]}'>
                    <input type="hidden" id='dept_id' value='{$_GET["dept_id"]}'>
                    <form method="get">
                        <div class="layui-inline">
                            <span class="btn-upload form-group">
                                <select name="dept_id" id="deptChange" class="layui-input search_input" <if condition='$class eq 1'>style="width:100px;background:#e6e6e6;"<else />style="width:100px;</if> {$class == 1?'disabled':''}>
                                    <option value="">按部门</option>
                                    <foreach name="depts" item="dept">
                                        <option value="{$dept.dept_id}" {$dept_id == $dept['dept_id'] ? 'selected' : ''}>{$dept.dept_name}</option>
                                    </foreach>
                                </select>
                            </span>
                        </div>
                        <div class="layui-inline">
                            <span class="btn-upload form-group">
                                <select name="user_id" id="user" class="layui-input search_input" <if condition='$class eq 1 and $priv_no gt 40'>style="width:100px;background:#e6e6e6;" disabled <else />style="width:100px;</if>>
                                    <option value="">选择人员</option>
                                    <foreach name="deptUsers" item="user">
                                        <option value="{$user.user_id}" {$user_id == $user['user_id'] ? 'selected' : ''}>{$user['user_name']?$user['user_name']:$user_id}</option>
                                    </foreach>
                                </select>
                            </span>
                        </div>
                        <a <if condition='$class eq 1 and $priv_no gt 40'>class="layui-btn search_btn" href ="javascript:return false;" style="margin-left:10px;background:#e6e6e6" <else />class="layui-btn search_btn search" data-url="{:U('index')}" style="margin-left:10px;"</if>> 查询</a>
                        <input type="hidden" name="p" value="1" />
                    </form>
                </blockquote>
                <div class="layui-tab-content larry-personal-body clearfix mylog-info-box">
                    <div class="layui-tab-item layui-field-box layui-show">
                        <!--<table class="layui-table table-hover" lay-even="" lay-skin="nob">-->
			<table class="layui-table setTabBg" lay-skin="line">
				<thead>
					<tr>
						<th>部门</th>
						<th>姓名</th>
						<th>出勤（天）</th>
                                                <th>出差（天）</th>
						<th>迟到</th>
						<th>早退</th>
                                                <th>剩余年假</th>
                                                <th>剩余调休</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
                                    <notempty>
                                        <foreach name='count_array' item='attend'>
                                            <tr>
                                                <td>{$attend.dept_name}</td>
                                                <td>{$attend.user_name}</td>
                                                <td>{$attend.all_total}</td>
                                                <td>{$attend.evection}</td>
                                                <td>{$attend.late}</td>
                                                <td>{$attend.early}</td>
                                                <td>{$attend.year}</td>
                                                <td>{$attend.vacation}</td>
                                                <td>
                                                    <span class="operationBtn detail" data-url="{:U('userAttend',array('dept_id'=>$attend['dept_id'],'user_id'=>$attend['user_id']))}">个人考勤</span>
                                                    <!--<span class="operationBtn detail" data-url="{:U('detail',array('user_id'=>$attend['user_id'],'date1'=>$attend['date1'],'date2'=>$attend['date2']))}">详细记录</span>-->
                                                    <!--<span class="operationBtn export" data-url="{:U('export_info',array('user_id'=>$attend['user_id'],'date1'=>$attend['date1'],'date2'=>$attend['date2']))}">导出个人明细</span>-->
                                                </td>
                                            <tr>
                                        </foreach>
                                    </notempty>
				</tbody>
			</table>
                        <div class="layui-block">共{$count}条数据</div>
                        <div class="larry-table-page clearfix">
                            <input type='hidden' id="followUrl" value="{:U('attentPlan')}">
                            <!--<a href="javascript:;" class="layui-btn layui-btn-small"><i class="iconfont icon-shanchu1"></i>删除</a>-->
                            <div id="page" class="page">{$page}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</block>
<block name="script">
    <script type="text/javascript" src="/Public/Admin/js/attend.js"></script>
    <script type="text/javascript">
        $(initAttend());
    </script>
</block>